/*
 *************************************************************************
 *西瑞克斯研发管理系统
 *版 本: 1.0   
 *日 期：02/08/2012    
 *作 者： 王浩 QQ：873987060   
 *************************************************************************   
 */
package com.application.yfthesis.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.manager.IBaseBean;
import com.manager.commons.DateUtil;

/**
 * 
 * Description:YfThesis实体<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 王浩 QQ：873987060 <br />
 * 
 * History: <br />
 * 
 * 02/08/2012
 * 
 */
@Entity
@Table(name = "yf_thesis")
public class YfThesis implements IBaseBean {

	/** serialVersionUID */
	protected static final long serialVersionUID = -1L;

	public YfThesis() {

	}

	@Id
	@Column(name = "id")
	private String id; // $field.label

	@Column(name = "project_no")
	private String projectNo; // $field.label

	@Column(name = "thesis_name")
	private String thesisName; // $field.label

	@Column(name = "author")
	private String author; // $field.label

	@Column(name = "publication_time")
	private Date publicationTime; // $field.label

	@Column(name = "domain")
	private Long domain; // $field.label

	@Column(name = "status")
	private Long status; // $field.label

	@Column(name = "org")
	private Long org; // $field.label

	@Column(name = "operateid")
	private String operateid; // $field.label

	@Column(name = "create_date")
	private Date createDate; // $field.label

	@Transient
	private String projectName;

	@Transient
	private String projectOrg;
	
	@Transient
	private String projectOrgName;

	public String getProjectOrgName() {
		return projectOrgName;
	}

	public void setProjectOrgName(String projectOrgName) {
		this.projectOrgName = projectOrgName;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getProjectOrg() {
		return projectOrg;
	}

	public void setProjectOrg(String projectOrg) {
		this.projectOrg = projectOrg;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Id.
	 */
	public String getId() {
		return this.id;
	}

	/**
	 * @param id
	 *            Set the id.
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the ProjectNo.
	 */
	public String getProjectNo() {
		return this.projectNo;
	}

	/**
	 * @param projectNo
	 *            Set the projectNo.
	 */
	public void setProjectNo(String projectNo) {
		this.projectNo = projectNo;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the ThesisName.
	 */
	public String getThesisName() {
		return this.thesisName;
	}

	/**
	 * @param thesisName
	 *            Set the thesisName.
	 */
	public void setThesisName(String thesisName) {
		this.thesisName = thesisName;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Author.
	 */
	public String getAuthor() {
		return this.author;
	}

	/**
	 * @param author
	 *            Set the author.
	 */
	public void setAuthor(String author) {
		this.author = author;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the PublicationTime.
	 */
	public Date getPublicationTime() {
		return this.publicationTime;
	}

	/**
	 * @param publicationTime
	 *            Set the publicationTime.
	 */
	public void setPublicationTime(Date publicationTime) {
		this.publicationTime = publicationTime;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Domain.
	 */
	public Long getDomain() {
		return this.domain;
	}

	/**
	 * @param domain
	 *            Set the domain.
	 */
	public void setDomain(Long domain) {
		this.domain = domain;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Status.
	 */
	public Long getStatus() {
		return this.status;
	}

	/**
	 * @param status
	 *            Set the status.
	 */
	public void setStatus(Long status) {
		this.status = status;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Org.
	 */
	public Long getOrg() {
		return this.org;
	}

	/**
	 * @param org
	 *            Set the org.
	 */
	public void setOrg(Long org) {
		this.org = org;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the Operateid.
	 */
	public String getOperateid() {
		return this.operateid;
	}

	/**
	 * @param operateid
	 *            Set the operateid.
	 */
	public void setOperateid(String operateid) {
		this.operateid = operateid;
	}

	/**
	 * ${field.getLabel()}
	 * 
	 * @return Returns the CreateDate.
	 */
	public Date getCreateDate() {
		return this.createDate;
	}

	/**
	 * @param createDate
	 *            Set the createDate.
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}
	@Transient
	public String publicationTimeStr;

	public String getPublicationTimeStr() {
		if(publicationTime!=null){
			return DateUtil.dateToString(publicationTime, "yyyy-MM-dd");
		}
		return "";
	}
}
